import {
  IsArray,
  IsNumber,
  IsOptional,
  IsString,
  Max,
  Min,
} from 'class-validator';

export class CreateHotelDto {
  @IsString()
  name: string;

  @IsString()
  address: string;

  @IsNumber()
  @Min(1)
  @Max(5)
  starRating: number;

  @IsArray()
  rooms: any[];
}

export class UpdateHotelDto {
  @IsString()
  @IsOptional()
  name?: string;

  @IsString()
  @IsOptional()
  address?: string;

  @IsNumber()
  @IsOptional()
  @Min(1)
  @Max(5)
  starRating?: number;

  @IsArray()
  @IsOptional()
  rooms?: any[];
}
